//
//  SegmentView.h
//  MyMovie
//
//  Created by Weiwei on 16/3/2.
//  Copyright © 2016年 bever贝沃汇力 weiwei. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef void (^SegmentBlock)(NSInteger index);

@interface SegmentView : UIView
#pragma -mark 
//(1)定义一个block
//(2)设置成属性
//（3）写一个带block的方法 --->setBlocK
//(4)声明一下，不然点击不了
@property(strong)SegmentBlock segmentBlock;
//-(void)chuanzhi:(SegmentBlock) segmentBlock;
//不声明一下，无法点击block
-(void)setSegmentBlock:(SegmentBlock)segmentBlock;



-(id)initWithFrame:(CGRect)frame withTitleArray:(NSArray*)array;

@end
